<extend name="Public/base" />

<block name="body">
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>信息列表</h2>
	</div>
	<div class="cf">
		<div class="fl">
            <button class="btn ajax-post confirm" url="{:U('deleteInfo')}" target-form="ids">删 除</button>
        </div>

       <!-- 高级搜索 -->
		<div class="search-form fr cf">
			<div class="sleft">
				<select name="cate_id" id="good_cate">
					<option value="">全部</option>
					<volist name="cateList" id="vo">
						<option value="{$vo.id}" <if condition="I('get.cate_id') eq $vo['id']">selected</if>>{$vo.name}</option>
					</volist>
				</select>
			</div>

			<div class="btn-group-click adv-sch-pannel fl">
				<button class="btn" id="search">搜 索</button>
			</div>
		</div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
	<table class="">
    <thead>
        <tr>
		<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
		<th class="">id</th>
		<th class="">信息分类</th>
		<th class="">发布用户</th>
		<th class="">手机号</th>
		<th class="">详细地址</th>
		<th class="">是否置顶</th>
		<th class="">置顶结束时间</th>
		<th class="">状态</th>
		<th class="">操作</th>
		</tr>
    </thead>
    <tbody>
		<notempty name="_list">
		<volist name="_list" id="vo">
		<tr>
            <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}" /></td>
			<td>{$vo.id} </td>
			<td>{$cateList[$vo['cate_id']]['name']}</td>
			<td>{$vo.name}</td>
			<td>{$vo.mobile}</td>
			<td>{$vo.address}</td>
			<td>
				<if condition="$vo['feeType'] gt 0">
				  置顶
				<else/>
				  未置顶 
			   </if>
		   </td>
		   <td>
		   	 <if condition="$vo['feeType'] gt 0">
				<if condition="$vo['end_time'] gt time()">
				  <php>echo date('Y-m-d',$vo['end_time']);</php>
				<else/>
				  已结束
			   </if>
			 <else/>
				  无  
			 </if>  
		   </td>
			<td>
				<if condition="$vo.status eq 0">
				  待审核
				<else/>
				  已审核
				</if>
			</td>
			<td>
			 	<a href="{:U('deleteInfo?ids='.$vo['id'])}" class="confirm ajax-get">删除</a>
            </td>
		</tr>
		</volist>
		<else/>
		<td colspan="8" class="text-center"> aOh! 暂时还没有内容! </td>
		</notempty>
	</tbody>
    </table>
	</div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
	<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
	<script type="text/javascript">
        //搜索功能
        $("#search").click(function(){
            var url ="{:U('index')}";
            var query  = $('.search-form').find('select').serialize();;
            if( url.indexOf('?')>0 ){
                url += '&' + query;
            }else{
                url += '?' + query;
            }
            window.location.href = url;
        });
        //导航高亮
        highlight_subnav('{:U("index")}');
	</script>
</block>
